﻿//------------------------------------------------------------------------------
// Written for CP2011 Project @ JCU, 2011
// By Drewan O'Brien
//
// Returns a Command object depending on the protocolString.Directive 
//------------------------------------------------------------------------------

using System;

namespace BluSteamServer.Model
{
    public class CommandFactory
    {
        public static Command MakeCommand(ProtocolData protocolString)
        {
            switch (protocolString.Directive)
            {
                case "LOGOUT":
                    return new LogoutCommand(protocolString.UserName);
            }

            return null;
        }
    }
}
